<nz-content class="content">
  <h3>发货地址管理</h3>
  <br>
  <div>
    <nz-table #AddressTable
      [nzShowPagination]="false"
      [nzData]="addressList" 
      [nzWidthConfig]="['120px','110px','110px','110px','80px','80px', '60px']"
      nzBordered>
      <thead>
        <tr>
          <th>Name</th>
          <th>Country</th>
          <th>Province</th>
          <th>City</th>
          <th>Post Code</th>
          <th>Tel</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of AddressTable.data; let i = index">
          <td>{{data.name}}</td>
          <td>{{data.country}}</td>
          <td>{{data.province}}</td>
          <td>{{data.city}}</td>
          <td>{{data.post_code}}</td>
          <td>{{data.tel}}</td>
          <td>
            <a (click)="onSelectItem(data)">查看</a>
            &nbsp;
            <a class="color-error" (click)="onRemoveItem(data.id, i)">删除</a>
          </td>
        </tr>
      </tbody>
    </nz-table>
  </div>
  <br>
  <div class="clearfix">
    <button class="float-right" nzSize="large" nzType="primary" (click)="onAddAddress()" nz-button>添加地址</button>
  </div>
</nz-content>

<!-- detail modal -->
<sda-ship-address-detail-modal 
  #DetailModal
  [address]="addressDetail"
  (onSuccess)="onModalHide()">
</sda-ship-address-detail-modal>
